﻿
'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic



Public Class dc_DiskPhysical
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_physDiskLastEdit = strUserId
    End Sub

#End Region

#Region " Properties and Fields "

    Private m_physDiskKey As Integer
    Private m_physDiskCompKey As Integer
    Private m_physDiskDevIdDisk As String
    Private m_physDiskDevIdPartition As String
    Private m_physDiskBootable As String
    Private m_physDiskSize As Int64
    Private m_physDiskBlockSize As Integer
    Private m_physDiskNumberOfBlocks As Int64
    Private m_physDiskIndex As Integer
    Private m_physDiskComment As String
    Private m_physDiskLastUpdate As Date
    Private m_physDiskLastEdit As String

    Const constPhysDiskKey As Integer = -1
    Const constPhysDiskCompKey As Integer = -1
    Const constPhysDiskDevIdDisk As String = "disk0"
    Const constPhysDiskDevIdPartition As String = "partition0"
    Const constPhysDiskBootable As String = "true"
    Const constPhysDiskSize As Int64 = -1
    Const constPhysDiskBlockSize As Int64 = 512
    Const constPhysDiskNumberOfBlocks As Int64 = -1
    Const constPhysDiskIndex As Integer = -1
    Const constPhysDiskComment As String = "na"
    Const constPhysDiskLastUpdate As Date = #1/1/2001#
    Const constPhysDiskLastEdit As String = "na"

    Public Property physDiskKey() As Integer
        Get
            Return Me.m_physDiskKey
        End Get
        Set(ByVal value As Integer)
            Me.m_physDiskKey = value
            Me.OnPropertyChanged("physDiskKey")
        End Set
    End Property

    Public Property physDiskCompKey() As Integer
        Get
            Return Me.m_physDiskCompKey
        End Get
        Set(ByVal value As Integer)
            Me.m_physDiskCompKey = value
            Me.OnPropertyChanged("physDiskCompKey")
        End Set
    End Property

    Public Property physDiskDevIdDisk() As String
        Get
            Return Me.m_physDiskDevIdDisk
        End Get
        Set(ByVal value As String)
            Me.m_physDiskDevIdDisk = value
            Me.OnPropertyChanged("physDiskDevIdDisk")
        End Set
    End Property

    Public Property physDiskDevIdPartition() As String
        Get
            Return Me.m_physDiskDevIdPartition
        End Get
        Set(ByVal value As String)
            Me.m_physDiskDevIdPartition = value
            Me.OnPropertyChanged("physDiskDevIdPartition")
        End Set
    End Property

    Public Property physDiskBootable() As String
        Get
            Return Me.m_physDiskBootable
        End Get
        Set(ByVal value As String)
            Me.m_physDiskBootable = value
            Me.OnPropertyChanged("physDiskBootable")
        End Set
    End Property

    Public Property physDiskSize() As Int64
        Get
            Return Me.m_physDiskSize
        End Get
        Set(ByVal value As Int64)
            Me.m_physDiskSize = value
            Me.OnPropertyChanged("physDiskSize")
        End Set
    End Property

    Public Property physDiskBlockSize() As Integer
        Get
            Return Me.m_physDiskBlockSize
        End Get
        Set(ByVal value As Integer)
            Me.m_physDiskBlockSize = value
            Me.OnPropertyChanged("physDiskBlockSize")
        End Set
    End Property

    Public Property physDiskNumberOfBlocks() As Int64
        Get
            Return Me.m_physDiskNumberOfBlocks
        End Get
        Set(ByVal value As Int64)
            Me.m_physDiskNumberOfBlocks = value
            Me.OnPropertyChanged("physDiskNumberOfBlocks")
        End Set
    End Property

    Public Property physDiskIndex() As Integer
        Get
            Return Me.m_physDiskIndex
        End Get
        Set(ByVal value As Integer)
            Me.m_physDiskIndex = value
            Me.OnPropertyChanged("physDiskIndex")
        End Set
    End Property

    Public Property physDiskComment() As String
        Get
            Return Me.m_physDiskComment
        End Get
        Set(ByVal value As String)
            Me.m_physDiskComment = value
            Me.OnPropertyChanged("physDiskComment")
        End Set
    End Property

    Public Property physDiskLastUpdate() As Date
        Get
            Return Me.m_physDiskLastUpdate
        End Get
        Set(ByVal value As Date)
            Me.m_physDiskLastUpdate = value
            Me.OnPropertyChanged("physDiskLastUpdate")
        End Set
    End Property

    Public Property physDiskLastEdit() As String
        Get
            Return Me.m_physDiskLastEdit
        End Get
        Set(ByVal value As String)
            Me.m_physDiskLastEdit = value
            Me.OnPropertyChanged("physDiskLastEdit")
        End Set
    End Property




#End Region

#Region " Methods "


    Public Sub initProperties()

        Try
            physDiskKey = constPhysDiskKey
            physDiskCompKey = constPhysDiskCompKey
            physDiskDevIdDisk = constPhysDiskDevIdDisk
            physDiskDevIdPartition = constPhysDiskDevIdPartition
            physDiskBootable = constPhysDiskBootable
            physDiskSize = constPhysDiskSize
            physDiskBlockSize = constPhysDiskBlockSize
            physDiskNumberOfBlocks = constPhysDiskNumberOfBlocks
            physDiskIndex = constPhysDiskIndex
            physDiskComment = constPhysDiskComment
            physDiskLastUpdate = constPhysDiskLastUpdate
            physDiskLastEdit = constPhysDiskLastEdit

        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub




#End Region


End Class


